<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>common/ui/jquery-easyui-1.3.0/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="<%=basePath%>common/ui/jquery-easyui-1.3.0/themes/icon.css">
	<script type="text/javascript" src="<%=basePath%>common/ui/jquery-easyui-1.3.0/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>common/ui/jquery-easyui-1.3.0/jquery.easyui.min.js"></script>
<script>
		$(function(){
			$('#test').datagrid({
				iconCls:'icon-save',
				nowrap: true,
				autoRowHeight: false,
				striped: true,
				collapsible:true,
				url:'<%=basePath%>manage/admin/member!dataList.action',
				sortName: 'code',
				sortOrder: 'desc',
				remoteSort: false,
				idField:'code',
				border:false,
				fit:true,
				fitColumns:true,
				pagination:true,
				rownumbers:true,
				frozenColumns:[[
	                {field:'ck',checkbox:true},
	                {title:'Code',field:'beanId',width:80,sortable:true,align:'center',}
				]],
				columns:[[
							{field:'name',title:'用户名',align:'center',width:200},
							{field:'beanCreateTime',title:'登录时间',width:150,align:'center'},
							{field:'beanLastModidyfiTime',title:'IP',width:150,align:'center'}
						]]
						
				
			});
			var p = $('#test').datagrid('getPager');
			$(p).pagination({
				onBeforeRefresh:function(){
					alert('before refresh');
				},
				pageSize: 15,//每页显示的记录条数，默认为10  
			    pageList: [10,15,20],//可以设置每页记录条数的列表  
			    beforePageText: '第',//页数文本框前显示的汉字  
			    afterPageText: '页    共 {pages} 页',  
			    displayMsg: '当前显示 {from} - {to} 条记录   共 {total} 条记录',  
			});
		});
		function resize(){
			$('#test').datagrid('resize', {
				width:700,
				height:400
			});
		}
		function getSelected(){
			var selected = $('#test').datagrid('getSelected');
			if (selected){
				alert(selected.code+":"+selected.name+":"+selected.addr+":"+selected.col4);
			}
		}
		function getSelections(){
			var ids = [];
			var rows = $('#test').datagrid('getSelections');
			for(var i=0;i<rows.length;i++){
				ids.push(rows[i].code);
			}
			alert(ids.join(':'));
		}
		function clearSelections(){
			$('#test').datagrid('clearSelections');
		}
		function selectRow(){
			$('#test').datagrid('selectRow',2);
		}
		function selectRecord(){
			$('#test').datagrid('selectRecord','002');
		}
		function unselectRow(){
			$('#test').datagrid('unselectRow',2);
		}
		function mergeCells(){
			$('#test').datagrid('mergeCells',{
				index:2,
				field:'addr',
				rowspan:2,
				colspan:2
			});
		}
	</script>
</head>

<body>
    <table id="test"  toolbar="#toolbar"></table>
    <div id="toolbar">
    <a href="<%=basePath%>manage/admin/user_grop!editPage.action" target="f_menus" class="easyui-linkbutton" iconcls="icon-add" onclick="newgroup();"
        plain="true">删除${title}日志</a> 
     </div>
</body>
</html>
